
    function getParamFromUrl(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var str = window.location.search.substr(1);
        console.log(str);
        var r = str.match(reg);
        if (r != null) return decodeURI(r[2]);
        return null;
    }

    var versions = { };
    versions.a = "1";
    versions.b = "1";
    versions.core = "21041505";
    versions.ani = "21041505";
    versions.html = "21041505";
    versions.ui = "21041505";
    versions.d3 = "21041505";
    versions.device = "21041505";
    versions.msgpack = "21041505";
    versions.bundle = "21041505";
    versions.ver = "21041505";

    var EXPARAMS = { };
    initPlatform();
    EXPARAMS.ver = versions.ver;

    var d = document.getElementById("loading-page");
    d.style.display = "none";
    var d = document.getElementById("noticeMask");
    d.style.display = "none";
    var d = document.getElementById("noticeBg");
    d.style.display = "none";

    function showLoadBg() {
        var d = document.createElement("div");
        d.innerHTML=" <div id='loading-page'></div>";
        document.body.appendChild(d);
    }

    function clearLoadBg() {
        var d = document.getElementById("loading-page");
        if (d) document.body.removeChild(d);
    }

    EXPARAMS.channel_id = getParamFromUrl('partner_id') || getParamFromUrl('9130_game_partner_id') || "1";
    EXPARAMS.game_pkg = getParamFromUrl('game_pkg') || getParamFromUrl('9130_game_pkg') || "com.lizi.tkc";
    EXPARAMS.device = getParamFromUrl('game_uuid') || getParamFromUrl('9130_game_uuid') || getDeviceId();
    console.log(EXPARAMS.channel_id, EXPARAMS.game_pkg, EXPARAMS.device);

    sdkInit();